#!/bin/sh

# number of messages = 20K
M=20000

# usage: gen_run_app.py NUM-CLIENTS CLIENT-SUFFIX NUM-MSG
for size in 1 2 4 8 14 32 64 126 254 510; do
	./gen_run_app.py $size $M
	q="debug"
        if [ $size -lt 8 ]; then
		nodes=1
	else
		nodes=$(($size/ 8 + 1))
		if [ $nodes -gt 32 ]; then
			q="reg_big"
		elif [ $nodes -gt 16 ]; then
			q="reg_med"
		fi
	fi
	sed -e "s/@N/$size/g" -e "s/@P/$nodes/g" -e "s/@Q/$q/g" job.pbs.in > job${size}.pbs
done

